<?php

namespace app\controllers;

use common\domain\base\ApiBaseController;

class SiteController extends ApiBaseController
{

    public function behaviors(): array
    {
        $behaviors = parent::behaviors();
        // 不进行认证的action
        $behaviors['authenticator']['optional'] = ['index'];

        return $behaviors;
    }

    /**
     * Start
     * @return array
     */
    public function actionIndex()
    {
        return [
            'code' => 0,
            'msg' => 'Hello world'
        ];
    }

}
